<!--
 * @Author: canlong.shen
 * @Date: 2021-11-02 10:21:43
 * @LastEditors: your name
 * @LastEditTime: 2021-11-02 10:30:39
 * @Description: file content
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>响应式数据</title>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script src="https://unpkg.com/vue@next"></script>
  </head>
  <body>
    <div id="root"></div>
    <script>
      Vue.createApp({
        data() {
          return {
            count: 0,
          }
        },
        mounted() {
          setInterval(() => {
            this.count++
          }, 1000)
        },
        template: `<div>{{count}}</div>`,
      }).mount("#root")
    </script>
  </body>
</html>
